package com.main;

import java.util.HashMap;

import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10;

public class Main implements ApplicationListener{
	private Screen activeState;
	private HashMap<Integer, Screen> stateList = new HashMap<Integer,Screen>();
	public void create() {
		new StaticTextures_Walls();
		new StaticTextures_Water();
		new StaticTextures();
		new StaticTileData();
		new StaticInventoryData();
		Gdx.graphics.setVSync(true);
		stateList.put(1,new Game(this));
		activeState = stateList.get(1);
		activeState.enter();
	}		

	@Override
	public void dispose() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void render() {
		GL10 gl = Gdx.graphics.getGL10();
		gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
		activeState.update();
		activeState.render();
		//System.out.println("FPS :" + Gdx.graphics.getFramesPerSecond());
	}

	@Override
	public void resize(int arg0, int arg1) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub
		
	}
}
